<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="js/jquery-3.6.0.js"></script>
  <script src="js/jquery-3.6.0.min.js"></script>
  <script>
  $(function(){
                    $.ajax({
                        url:"getMessageServlet",
                        dataType:"json",
                        type:"POST",
                        data:{usercode:"user"},
                        success:function(data){
                                $("#nickname").text(data.nickname);
                                $("#user_face").text(data.user_face);
                                $("#user_sex").text(data.user_sex);
                                $("#user_email").text(data.user_email);
                            },
                    })
                   }
                )
        </script>
</head>
<body>
<h1>QG_贴吧</h1>
<h2>个人中心</h2>
<a href="http://localhost:8080/p/Modify.jsp" target="_self">修改个人信息</a>
<a href="http://localhost:8080/p/modifyPassword.jsp" target="_self">修改密码</a>
<table>
  <tr>
    <td>用户昵称</td>
    <td id=nickname>

    </td>
  </tr>
  <tr>
    <td>头像</td>
    <td id=user_face>

    </td>
  </tr>
  <tr>
    <td>性别</td>
    <td id=user_sex>

    </td>
  </tr>
  <tr>
    <td>邮箱</td>
    <td id=user_email>

    </td>
  </tr>
  <tr>
    <td>用户级别</td>
    <td>普通用户</td>
  </tr>
</table>
</body>
</html>